<script language='javascript' type='text/javascript' src="<?=base_url('customers')?>scripts/customers.js"></script>
<?php echo form_open($this->customers_list_model->url_prefix); ?>
<?if($msg){?><center><div class="messageBox"><?=$msg?></div></center><?}?>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="text">
  <tr align="center" id="listTableHeader"> 
	<td width="30"><a href="javascript:customers.sortColumn(<?=$start?>, 'id')"{sort_id}>#</a></td>
    <td width="15"><input type="checkbox" onclick="common.mark_all_rows('uid[]', this.checked)" /></td>
    <td width="150"><a href="javascript:customers.sortColumn(<?=$start?>, 'name')"{sort_title}>Tên khách hàng</a></td>
    <td>Thông tin khách hàng</td>
	<td>Liên kết</td>
	<td width="150">Logo</td>
	<td width="60">Trạng thái</td>
    <td width="60">Xử lý</td>
  </tr>
<?$i=1;foreach($items as $item){?>
  <tr class="row<?=($i==1)?'1':'2'?>">
	<td><?=$item->{CUSTOMERS_CUSTOMER_ID}?></td>
    <td><input type="checkbox" name="uid[]" value="<?=$item->{CUSTOMERS_CUSTOMER_ID}?>" /></td>
	<td align="left" style="font-weight:bold"><?=h($item->{CUSTOMERS_FULL_NAME})?></td>
	<td align="left"><?=($item->{CUSTOMERS_INFO})?></td>
	<td align="left"><?=($item->{CUSTOMERS_LINK})?></td>
	<td align="center"><img src="<?=h($item->image_path)?>" width="100px" /></td>
	<td width="30" align="center"><a href="#" onclick="common.switch_status('<?= site_url('admin_ajax/customers.customers_process.change_status/' . $item->{CUSTOMERS_CUSTOMER_ID})?>', 'activediv_<?=$item->{CUSTOMERS_CUSTOMER_ID}?>');"><div id = "activediv_<?=$item->{CUSTOMERS_CUSTOMER_ID}?>" class="<?=$item->{CUSTOMERS_STATUS} == 1 ? 'active_icon' : 'inactive_icon'?>"></div></a></td>
    <td>
        <a href="<?=site_url($this->customers_list_model->url_prefix2.'/'.$start.'/'.$item->{CUSTOMERS_CUSTOMER_ID})?>"><div class="edit_icon">|</div></a>
        <a href="javascript:customers.deleteOne(<?=$start?>, <?=$item->{CUSTOMERS_CUSTOMER_ID}?>);"><div class="delete_icon"></div></a>
    </td>
  <tr>
<?$i=-$i;}?>
  <tr>
    <td colspan="7">
	<? if ($items) { if ($paging) { ?>
      <table class="adminlist" border="0" cellpadding="0" cellpadding="0" width="100%" class="PagingTable">
        <tr>
          <td class="pageCounter" width="100%" align="center">
            {paging}
          </td>
        </tr>
      </table>
	<? }} else { ?>
		<br />
		<?=$this->lang->line('not_found')?>
	<? } ?>
    </td>
  </tr>
</table>
</form>